Function objects

From Cppreference

< cpp
Jump to: navigation, search

Contents

Function objects

Arithmetic operations
plus
function object implementing ​x + x​
(class template)
minus
function object implementing ​x - y​
(class template)
multiplies
function object implementing ​x * y​
(class template)
divides
function object implementing ​x / y​
(class template)
modulus
function object implementing ​x % y​
(class template)
negates
function object implementing -x​
(class template)
Comparisons
equal_to
function object implementing ​x == y​
(class template)
not_equal_to
function object implementing ​x != y​
(class template)
greater
function object implementing ​x > y​
(class template)
less
function object implementing ​x < y​
(class template)
greater_equal
function object implementing ​x >= y​
(class template)
less_equal
function object implementing ​x <= y​
(class template)
Logical operations
logical_and
function object implementing ​x && y​
(class template)
logical_or
function object implementing ​x || y​
(class template)
logical_not
function object implementing !x​
(class template)
Bitwise operations
bit_and
function object implementing ​x & y​
(class template)
bit_or
function object implementing ​x | y​
(class template)
bit_xor
function object implementing ​x ^ y​
(class template)
Negators
unary_negate
function object implementing unary negation
(class template)
binary_negate
function object implementing binary negation
(class template)
not1
constructs custom unary_negate object
(function template)
not2
constructs custom binary_negate object
(function template)

Bind

bind (C++0x)
binds one or more parameters to a function object
(function template)
mem_fn (C++0x)
binds an object to a pointer to its member function to form independent function object
(function template)
is_bind_expression (C++0x)

(class template)
is_placeholder (C++0x)

(class template)
Polymorphic function wrappers
bad_function_call (C++0x)

(class)
function (C++0x)

(class template)
Placeholders

Deprecated in C++0x

Base
unary_function (deprecated)
unary function base class
(class template)
binary_function (deprecated)
binary function base class
(class template)
Binders
binder1st (deprecated)
function object implementing one parameter binding
(class template)
binder2nd (deprecated)
function object implementing two parameter binding
(class template)
bind1st (deprecated)
binds a parameter to a function (constructs a binder1st object)
(function template)
bind2nd (deprecated)
binds two parameters to a function (constructs a binder2nd object)
(function template)
Function adaptors
pointer_to_unary_function (deprecated)

(class template)
pointer_to_binary_function (deprecated)

(class template)
const_mem_fun1_t (deprecated)

(class template)
const_mem_fun1_ref_t (deprecated)

(class template)
const_mem_fun_t (deprecated)

(class template)
const_mem_fun_ref_t (deprecated)

(class template)
mem_fun1_t (deprecated)

(class template)
mem_fun1_ref_t (deprecated)

(class template)
mem_fun_t (deprecated)

(class template)
mem_fun_ref_t (deprecated)

(class template)
ptr_fun (deprecated)

(function template)
mem_fun (deprecated)

(function template)
mem_fun_ref (deprecated)

(function template)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages